#!/usr/bin/env python

import wx
#import os
#import sys

import matplotlib
matplotlib.interactive(True)
matplotlib.use('module://iplot.mpl.backend_iplot')

#import iplot.mpl.backend_iplot
from iplot.mpl.backend_iplot import IPlotFrame

#-----------------------------------------
#Creating our application
#-----------------------------------------     
class MyApp(wx.PySimpleApp):
    """Creating our application"""
    def __init__(self):
        wx.PySimpleApp.__init__(self)
        
        self.frame = IPlotFrame()
        self.iplot = self.frame
        self.iplot.Show(True)

#-----------------------------------------
#Main loop
#----------------------------------------- 
def main():
    from pylab import show
    show._needmain = False
    app = MyApp()
    app.SetAppName('IPlot')
    app.SetTopWindow(app.frame)
    
    app.MainLoop()

if __name__ == '__main__':
    main()